/*Random number generator, real version 2 (QUICK C: Angel Diaz)*/

#includ "randUse.h"
#define a (double) 16807.0
#define m (double) 2147483647.0
#define q (double) 127773.0
#define r (float) 2836.0
double hi, test, lo;

float randomvar(double seed)
{      hi=floor(seed/q);
	lo=seed-q*hi;
	test=a*lo-r*hi;
	if (test>0.0)
	   seed=test;
	else
	   seed=test+m;
	random=seed/m;
	return random;
 }

